home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 23 / develop Issue 23 code / Multipane Dialogs Code.sea / Multipane Dialogs Code / Utilities.h / Utilities.h
Encoding:
C/C++ Source or Header  |  1995-02-16  |  2.2 KB  |  50 lines  |  [TEXT/MMCC]

  1. #define kCntlActivate            0            /* enabled control’s hilite state */
  2. #define kCntlDeactivate            0xFF        /* disabled control’s hilite state */
  3. #define kButtonFrameSize        3            /* button frame’s pen size */
  4. #define kButtonFrameInset        (-4)        /* inset rectangle adjustment around button */
  5.  
  6. extern short    gQDVersion;                /* major QD version #; 0 for original,
  7.                                             1 for color QD, 2 for 32-bit QD */
  8. extern short gInitMPDUtils;
  9.  
  10. // ******************** Dialog & Window
  11. Boolean GetCheckOrRadio(DialogPtr dlgPtr, short itemNo);
  12. void ToggleCheck(DialogPtr dlgPtr, short chkItem);
  13. void SetCheckOrRadioButton(DialogPtr dlgPtr, short itemNo, short state);
  14. void OutlineDialogItem(DialogPtr dlgPtr, short item);
  15. void OutlineControl(ControlHandle button);
  16. DialogPtr GetCenteredDialog(short id, DialogPtr storage, WindowPtr relatedWindow, WindowPtr behind);
  17. Rect CenterWindow(WindowPtr window, WindowPtr relatedWindow, Rect sizeInfo);
  18. OSErr SimpleCanDialog(void);
  19. void UseControlStyle(ControlHandle ctl);
  20. void DoDraw1Control(ControlHandle ctl, Boolean scrollBarsOnly);
  21. void ShowStyledControl(ControlHandle ctl);
  22. Boolean IsScrollBar(ControlHandle ctl);
  23. short GetButtonVariant(ControlHandle ctl);
  24. Boolean GetControlStyle(ControlHandle ctl, void *cinfo);
  25. Boolean WhichControl(Point mouseLoc, long when, WindowPtr window, ControlHandle *ctlHit);
  26.  
  27. // ******************** Rectangle & Point
  28. Rect GetWindowContentRect(WindowPtr window);
  29. Rect GetWindowStructureRect(WindowPtr window);
  30. Point GetGlobalTopLeft(WindowPtr window);
  31. void LocalToGlobalRect(Rect *aRect);
  32. void PositionRectInRect(Rect outerRect, Rect *innerRect, Fixed horzRatio, Fixed vertRatio);
  33.  
  34. // ******************** Miscelaneous
  35. char LockHandleHigh(Handle theHandle);
  36. short GetHexByte(char *cptr);
  37. Handle GetAppResource(ResType theType, short theID, OSErr *err);
  38. Boolean    TrapExists(short theTrap);
  39. short NumToolboxTraps(void);
  40. TrapType GetTrapType(short theTrap);
  41. void InitMPDUtils(void);
  42.  
  43. // ******************** Window Centering Support
  44. Rect GetWindowDeviceRectNMB(WindowPtr window);
  45. Rect GetWindowDeviceRect(WindowPtr window);
  46. Rect GetMainScreenRect(void);
  47. GDHandle GetRectDevice(Rect globalRect);
  48. RgnHandle LocalScreenDepthRegion(short depth);
  49. RgnHandle ScreenDepthRegion(short depth);
  50.